import request from '@/utils/request'

export const getTaskListService = () => {
    return request.get('/api/task/list')
}

export const addTaskService = (data) => {
    return request.post('/api/task/add', data)
}

export const deleteTaskService = (params) => {
    return request.delete(`/api/task/delete/${params.id}`)
}

export const getTaskTypeAndStatusService = () => {
    return request.get(`/api/task/type/status`)
}

export const updateTaskService = (data) => {
    return request.post(`/api/task/update`, data)
}

export const searchTaskService = (params) => {
    return request.get(`/api/task/list/search`, {params})
}